import { ActionContext } from "vuex"
import { IApp, IStore } from "../types"

const state: IApp = {
  uuid: ''
}

const mutations = {
  SET_UUID: (state: IApp, uuid: string) => {
    state.uuid = uuid
  }
}


const actions = {
  // 设置uuid
  async setUuid({ commit }: ActionContext<IApp, IStore>, uuid: string) {
    commit('SET_UUID', uuid)
  }
}




const app = {
  state,
  mutations,
  actions
}

export default app
